<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
    <meta charset="UTF-8">
    <title>视频列表</title>
    <link rel="stylesheet" type="text/css"
          href="{{ url_for('static',filename='jquery-easyui-1.7.0/themes/default/easyui.css') }}">
    <link rel="stylesheet" type="text/css"
          href="{{ url_for('static',filename='jquery-easyui-1.7.0/themes/icon.css') }}">
    <link rel="stylesheet" type="text/css"
          href="{{ url_for('static',filename='jquery-easyui-1.7.0/themes/color.css') }}">
    <script src="{{ url_for('static',filename='jquery-easyui-1.7.0/jquery.min.js') }}"></script>
    <script src="{{ url_for('static',filename='jquery-easyui-1.7.0/jquery.easyui.min.js') }}"></script>
    <script src="{{ url_for('static',filename='index.js') }}"></script>
</head>
<body class="easyui-layout">
<div data-options="region:'north'" style="height:80px;">
    <h1>简单的视频直播</h1>
</div>
<div data-options="region:'center'">
    <table class="easyui-datagrid" data-options="title:'视频列表'" id="dg">
        <thead>
        <tr>
            <th data-options="field:'id',hidden:true">id</th>
            <th data-options="field:'ufid',hidden:true">ufid</th>
            <th data-options="field:'filename'">文件名</th>
            <th data-options="field:'key1'">关键字1</th>
            <th data-options="field:'key2'">关键字2</th>
            <th data-options="field:'key3'">关键字3</th>
            <th data-options="field:'do'">操作</th>
        </tr>
        </thead>
        <tbody>
        {% for curr in list %}
            <tr>
                <td>{{ curr.id }}</td>
                <td>{{ curr.ufid }}</td>
                <td>{{ curr.filename }}</td>
                <td>{{ curr.key1 }}</td>
                <td>{{ curr.key2 }}</td>
                <td>{{ curr.key3 }}</td>
                <td>
                    <a href="/stream/{{ curr.key1 }}/{{ curr.key2 }}/{{ curr.key3 }}" class="easyui-linkbutton"
                       data-options="iconCls:'icon-ok'" id="play">播放</a>
                    <a href="/delete/{{ curr.id }}/{{ curr.ufid }}" class="easyui-linkbutton"
                       data-options="iconCls:'icon-cancel'" id="delete">删除</a>
                    <a href="/download/{{ curr.key1 }}/{{ curr.key2 }}/{{ curr.key3 }}" class="easyui-linkbutton"
                       data-options="iconCls:'icon-undo'" id="download">下载</a>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
    <div id="tb">
        <a href="/upload" class="easyui-linkbutton" data-options="iconCls:'icon-redo'">上传视频</a>
    </div>
</div>
{#<table>#}
{#    <thead>#}
{#    <tr>#}
{#        <td style="display:none;">id</td>#}
{#        <td style="display:none;">ufid</td>#}
{#        <td>文件名</td>#}
{#        <td>关键字1</td>#}
{#        <td>关键字2</td>#}
{#        <td>关键字3</td>#}
{#    </tr>#}
{#    </thead>#}
{#    {% for curr in list %}#}
{#        <tr>#}
{#            <td style="display:none;">{{ curr.id }}</td>#}
{#            <td style="display:none;">{{ curr.ufid }}</td>#}
{#            <td>{{ curr.filename }}</td>#}
{#            <td>{{ curr.key1 }}</td>#}
{#            <td>{{ curr.key2 }}</td>#}
{#            <td>{{ curr.key3 }}</td>#}
{#            <td>#}
{#                <a href="/stream/{{ curr.key1 }}/{{ curr.key2 }}/{{ curr.key3 }}">播放</a>#}
{#            </td>#}
{#            <td>#}
{#                <a href="/delete/{{ curr.id }}/{{ curr.ufid }}">删除</a>#}
{#            </td>#}
{#        </tr>#}
{#    {% endfor %}#}
{#</table>#}
{#{% for msg in get_flashed_messages() %}#}
{#    <p>{{ msg }}</p>#}
{#{% endfor %}#}
</body>
</html>